package org.snail.constant;

import java.util.HashMap;
import java.util.Map;

public class GroupConstant {

    public static final Integer DING_API_TYPE  = 2;     //根据API生成的群组分类
    public static final Integer DINGDING_TYPE = 3;
    public static final Integer ADMIN_TYPE = 1;

    public static final Integer TEXT_MSG = 1;
    public static final Integer LINK_MSG = 2;
    public static final Integer FILE_MSG = 3;

    /**
     * 群组 自定义群组 Map 中的key
     */
    public static final String XML_MAP_LEVELRULES  = "levelRules";
    public static final String XML_MAP_DEPTIDRULES  = "deptIdRules";

    /**
     * 配置群组读取路由时，配置的路由名称
     */
    public static final String XML_PATH  = "DingGroup.xml";

    /**
     * 钉钉接口限制参数
     */
    public static final int ADD_USER_LIST_MAX_NUM  = 40;
    public static final int ADD_DING_NAME_MAX_LENGTH  = 20;
    public static final String DING_OUTNUM_KEY  = "客户工号";
    public static final Long ROOT_DEPT_ID  = Long.valueOf(25393462);

    /**
     *群名字过长时，优先去除地名
     */
    public static final String DING_BEIJIN_KEY  = "-北京";
    public static final String DING_HANGZHOU_KEY  = "-杭州";
    public static final String DING_SHANGHAI_KEY  = "-上海";

    /**
     * 群消息通知    066217045824030227
     */
    public static final String NOTIFY_GROUP_CHATID  = "chatda899f12112d658cd228ba1d5eb57cbf";
    public static final String NOTIFY_GROUP_CHATID_TEST  = "chat1da1b794f9cefb7466ae37385e440b9f";
    public static final String BJC_SENDER  = "066217045824030227";


    /**
     * 群状态
     */
    public static final Integer UPDATE_STATUS  = 1;
    public static final Integer INSERT_STATUS  = 2;
    public static final Integer DEL_STATUS  = 3;
    public static final Integer SAME_STATUS  = 4;

    /**
     * 群组分类相关信息
     */
    public static  final Long OFFSET_NUM = Long.valueOf(50);
    public static  final Integer SIZE = 5;


    /**
     * activemq 类型
     */
    public static final Integer GROUP_TYPE  = 1;
    public static final Integer CHILD_GROUP_LIST_TYPE  = 2;
    /**
     * 设置部门Manager
     */
    public static final Integer DEPT_MANAGER_TYPE  = 3;

    /**
     * 群发消息异常次数 为了防止死循环
     */
    public static final Integer ERR_NUMBER = 10;
    /**
     * list排位顺序
     */
    public static final Integer TOTAL_COONT  = 4;     //总共包含了四类list
    public static final Integer SAME_GROUP_LIST_INDEX  = 0;
    public static final Integer ADD_GROUP_LIST_INDEX  = 1;
    public static final Integer UPDATE_GROUP_LIST_INDEX  = 2;
    public static final Integer DELETE_GROUP_LIST_INDEX  = 3;

    /**
     * 同步群消息通用语句
     */
    public static final Map<Integer, String> STATUS_GROUP_MSG_MAP  = new HashMap<Integer, String>(){
        {
            put(GroupConstant.UPDATE_STATUS, "修改群列表：\n");
            put(GroupConstant.INSERT_STATUS, "新建群列表：\n ");
            put(GroupConstant.DEL_STATUS, "☆☆删除群列表（手动删除）:\n");
            put(GroupConstant.SAME_STATUS, "相同群列表：\n");
        }
    };

    /**
     * 同步群最大发送消息的值
     */
    public static final Integer GROUP_MSG_LIST_MAX_NUM  = 5;


}
